package org.luxor.commons.zookeeper.annotation;

import org.luxor.commons.zookeeper.constant.Watcher;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * Zookeeper 节点动态观察者
 *
 * @author Mr.yan @date 2019/10/12
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ZookeeperWatcher {

    /**
     * 目标观察节点
     */
    @AliasFor(value = "path")
    String value() default "";

    /**
     * 目标观察节点
     */
    @AliasFor(value = "value")
    String path() default "";

    /**
     * 观察者类型
     */
    Watcher watcher() default Watcher.NodeCache;

}
